package org.csmzxy.class2334;

public class Shape {
    private String type;
    private String color;
    public Shape(String type,String color){
        this.type = type;
        this.color = color;
    }
    @Override
    public boolean equals(Object obj){
        if (this == obj){
            return true;
        }
        if (obj == null || !(obj instanceof  Shape)){
            return false;
        }
        Shape shape = (Shape) obj;
        return type.equals(shape.type) && color.equals(shape.color);
    }
    @Override
    public String toString(){
        return "Shape{"+"type='"+type+",color='"+color+'}';
    }
}